package com.scau.ums.mapper;

import com.scau.ums.model.Repairtaskorder;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;

import java.util.List;
import java.util.Map;

public interface SelectTaskMapper {
    //查询维修工个人的任务表
    //maintainerID维修工的个人id
    @SelectProvider(method ="SelectTask" ,type = com.scau.ums.util.dao.SelectTaskSql.class)
    public List<Map<String, Object>> SelectTask(@Param("id") String maintainerId,@Param("state") String state);

    @SelectProvider(method ="SelectInfo" ,type = com.scau.ums.util.dao.SelectTaskSql.class)
    public List<Map<String, Object>> SelectInfo(@Param("id") String maintainerId,@Param("state") String state);


    @UpdateProvider(method ="UpadateTaskState" ,type = com.scau.ums.util.dao.SelectTaskSql.class)
    public int UpadateTaskState(@Param("id") String reportId,@Param("state") String state);

    @SelectProvider(method = "allowCancelTaskList",type = com.scau.ums.util.dao.SelectTaskSql.class)
    public List<Repairtaskorder> allowCancelTaskList();
}
